package com.pig4cloud.pig.demo.feign;

import com.pig4cloud.pig.demo.dto.Result;
import com.pig4cloud.pig.demo.dto.SmartAppGoodsDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("demo-biz")
public interface SmartAppGoodsFeign {


	@GetMapping("/demo-biz/goods/getList")
	Result<List<SmartAppGoodsDto>> getList();

	@GetMapping("/demo-biz/goods/getById/{id}")
	Result<SmartAppGoodsDto> getById(@PathVariable("id")Long id);

	@DeleteMapping("/demo-biz/goods/delete/{id}")
	Result delete(@PathVariable("id")Long id);

	@PostMapping("/demo-biz/goods/add")
	Result add(@RequestBody SmartAppGoodsDto goodsDto);

	@PutMapping("/demo-biz/goods/update")
	Result update(@RequestBody SmartAppGoodsDto goodsDto);
}
